package engine.newUi
{
	import engine.control.loading.MultLoader;
	import engine.data.ResPath;
	import engine.ui.lite.BaseUI;
	
	import flash.display.DisplayObjectContainer;
	import flash.display.MovieClip;
	
	import newx.com.control.NxClip;
	import newx.com.control.button.NxButton;
	import newx.com.control.group.NxViewGroup;
	import newx.com.control.text.NxLabel;

	/**
	 * 物品合成UI 
	 * @author liuel
	 * 
	 */	
	public class ComposeItemUI extends BaseUI
	{
		private static var _self	:ComposeItemUI;
		public var itemGroup		:NxViewGroup;
		public var materialGroup	:NxViewGroup;
		public var prinMC			:MovieClip;
		public var panlMc			:MovieClip;
		public var mc1				:MovieClip;
		public var mc2				:MovieClip
		public var mc3				:NxClip;
		public var mc4				:MovieClip
		public var mc5				:MovieClip
		public var mc6				:MovieClip
		public var mc7				:MovieClip
		public var mc8				:MovieClip
		public var tip			:NxLabel;
		public var label1		:NxLabel;
		public var label2			:NxLabel;
		/**合成物**/
		public var targetlabel		:NxLabel;
		public var startBtn		:NxButton;
		public var lab_selectitem  : NxLabel;
		public var compleBtn		:NxButton;
		public var succsemc:MovieClip;
		public function ComposeItemUI(popupUI:Boolean=true)
		{
			super(popupUI);
		}
		public static function getInstance():ComposeItemUI
		{
			if(_self==null)
			{
				_self=new ComposeItemUI();
			}
			return _self;
		}
		override public function show(space:DisplayObjectContainer=null, onshow:Function=null, ...argc):void
		{
			if(!MultLoader.getInstance().getSourceByUrl(ResPath.SWF+"ComposeItemUI"+".swf"))
			{
				MultLoader.getInstance().load([ResPath.SWF+"ComposeItemUI"+".swf"],true ,create);
			}else
			{
				create();
			}
		}
		private function create():void
		{
			mc3.source = MultLoader.getInstance().getSourceByUrl(ResPath.SWF+"ComposeItemUI"+".swf");
			super.show(); 
		}
		override public function  Init():void
		{
			ComposeItemLogic.getInstance().Init();
		}
		override protected function	BeforeShow():void
		{
			ComposeItemLogic.getInstance().BeforeShow();
		}
		override protected function	AfterHide():void
		{
			ComposeItemLogic.getInstance().AfterHide();
		}
	}
}